<html>
<head><meta charset="utf-8"><title>Specify DWARF version · t-compiler/wg-llvm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/index.html">t-compiler/wg-llvm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/Specify.20DWARF.20version.html">Specify DWARF version</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248192644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/Specify%20DWARF%20version/near/248192644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Artem Mukhin <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/Specify.20DWARF.20version.html#248192644">(Aug 03 2021 at 08:04)</a>:</h4>
<p>Hi everyone, I'm wondering how to tell rustc to use a specific DWARF version for debug information. I've tried <code>rustc -C llvm-args="--gdwarf-N"</code> (which works fine with clang: <code>$ clang -gdwarf-N</code>) and  <code>rustc -C llvm-args="--dwarf-version=N"</code> (found in LLVM sources). But <code>rustc</code> fails with <code>Unknown command line argument</code> anyway</p>



<a name="248200703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/Specify%20DWARF%20version/near/248200703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/Specify.20DWARF.20version.html#248200703">(Aug 03 2021 at 09:42)</a>:</h4>
<p>Looks like you can change it using a custom target specification with the <code>dwarf-version</code> field.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>